<%@ page session="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	
	<link rel="stylesheet" href="<c:url value="/styles/bootstrap/3.3.5/css/bootstrap.min.css" />" />
    <link rel="stylesheet" href="<c:url value="/styles/bootstrap/3.3.5/css/bootstrap-theme.min.css" />" />
    <link rel="stylesheet" href="<c:url value="/styles/pivotal.css" />" />

	<title>
		<fmt:message>
			<tiles:insertAttribute name="title"/>
		</fmt:message>
	</title>
	<script src="<c:url value="/js/jquery-1.11.0.min.js"/>" type="text/javascript"></script>
	<script src="<c:url value="/scripts/getAsJson.js"/>" type="text/javascript"></script>
</head>
<body>
	<div class="container">
		<div class="row">
			<nav class="navbar navbar-inverse">
				<div class="container-fluid">
					<div class="navbar-header">
						<a title="Spring IO" href="http://www.spring.io"> 
							<img src="<c:url value="/images/spring-trans-dark.png"/>" height="50"/>
						</a>
					</div>
					<div>
						<ul class="nav navbar-nav">
							<tiles:importAttribute name="navigationTab" />
							<c:if test="${navigationTab != 'home'}">
								<li>
									<a href="<c:url value="/"/>"><fmt:message key="navigate.home" /></a>
								</li>
							</c:if>
							<c:if test="${navigationTab != 'accounts'}">
								<spring:url var="listUrl" value="/accounts"/>
								<li>
									<a href="${listUrl}"><fmt:message key="navigate.accounts" /></a>
								</li>
								<li>
									<a href="javascript:getAsJson('${listUrl}')">
										<fmt:message key="navigate.accounts" /> (JSON)
									</a>
								</li>
							</c:if>
							<c:if test="${navigationTab != 'search'}">
								<li>
									<a href="<c:url value="/accounts/search"/>"><fmt:message key="navigate.search" /></a>
								</li>
							</c:if>
						</ul>							
						<ul class="nav navbar-nav navbar-right">
							<li>
								<a href="http://www.pivotal.io">
									<img alt="Pivotal" title="Pivotal" height="20" src="<c:url value="/images/pivotal-logo-600.png" />" />
								</a>
							</li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
			
		<div class="row">
			<tiles:insertAttribute name="main" />
		</div>
		
		<div class="row">
			<p><fmt:message key="footer.message"/></p>
		</div>	

	</div>

</body>
</html>